package com.miao.util.developMode.observerMode;

import java.util.Observer;

/**
 * Created by miao on 2015/4/13.
 */
public class TestMode {

    public static void main(String[] args) {
        //创建主题(被观察者)
        Watched watched = new Watched();

        //创建观察者,并将主题登记
        Observer watcher = new Watcher(watched);
//        Observer watcher1 = new Watcher(watched);

        //给被观察者状态赋值
        watched.setData("start");
        watched.setData("run");
        watched.setData("stop");
    }
}
